// pages/work3/index.js
Page({
  data:{
    result:'未输入'
  },
  submit(e){
    console.log(e)
    let n1 = Number(e.detail.value.num1)
    let n2 = Number(e.detail.value.num2)
    if(n1>n2){
      this.setData({
        result:'第一个数大'
      })
    }else if(n1<n2){
      this.setData({
        result:'第二个数大'
      })
    }else{
      this.setData({
        result:'两个数一样大'
      })
    }
  }
})